import React from 'react'
import { useHistoryTravel } from 'ahooks';



const Dingdan = () => {
    const { value, setValue, backLength, forwardLength, back, forward } = useHistoryTravel<string>();
    return (

        <div>
            <input value={value || ''} onChange={(e) => setValue(e.target.value)} />
            <button disabled={backLength <= 0} onClick={back} style={{ margin: '0 8px' }}>
                back
            </button>
            <button disabled={forwardLength <= 0} onClick={forward}>
                forward
            </button>
        </div>




    )
}
export default Dingdan;
